using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public partial class temp : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        SqlDataReader dr = ProjectUtility.executeQueryReader("select * from Tour");

        GridView1.DataSource = dr;
        GridView1.DataBind();

        SqlCommand cmd = new SqlCommand("insert into Tour values(@PackID , @Startdate , @Enddate , @NumberOfSeats , @Status)");
        cmd.Parameters.AddWithValue("PackID", 2);
        cmd.Parameters.AddWithValue("Startdate", "01/01/2010");
        cmd.Parameters.AddWithValue("Enddate", "01/01/2010");
        cmd.Parameters.AddWithValue("NumberOfSeats", 2);
        cmd.Parameters.AddWithValue("Status", "True");

        ProjectUtility.executeInsertUpdateDelete(cmd);
    }
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        LinkButton lb = (LinkButton)sender;
        String id = lb.CommandArgument.ToString();
        Response.Redirect("temp2.aspx?id=" + id);
    }
}
